<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LYF</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <style>
        .focus {
            width: 800px;
            height: 300px;
            margin: 100px auto;
            background-color: pink;
        }

        .carousel-inner {
            height: 300px;
        }

        .carousel-inner img {
            /* 如果样式修改不成功 记得提高权重试试 */
            height: 300px !important;
            width: 100%;
        }

        /* 修改图片里面的字体颜色 */
        .carousel-caption {
            color: black;
        }
    </style>
</head>

<body>
    <div class="focus">
        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                <li data-target="#carousel-example-generic" data-slide-to="2"></li>
            </ol>

            <!-- Wrapper for slides 轮播图模块 -->
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img src="images/lyf1.jpg" alt="...">
                    <div class="carousel-caption">
                        No.1
                    </div>
                </div>
                <div class="item">
                    <img src="images/lyf2.jpg" alt="...">
                    <div class="carousel-caption">
                        No.2
                    </div>
                </div>
                <div class="item">
                    <img src="images/lyf3.jpg" alt="...">
                    <div class="carousel-caption">
                        No.3
                    </div>
                </div>

            </div>

            <!-- Controls  左右箭头-->
            <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
        </div>
    </div>
    <script>
        $('.carousel').carousel({
            interval: 2000
        })
    </script>
</body>

</html>